package com.quartz;

import java.text.SimpleDateFormat;
import java.util.Date;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by Administrator on 2018-9-12 0012.
 */
@Component
public class checkTestStudentJob {


    @Scheduled(cron = "0/2 * * * * ?")
    public void test()  {
        System.out.println("----测试Quartz注解方式, " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
    }
}
